const request = require('../../utils/Interface.js')

// 注册
export function register(data) {
  return request.doRequest(
    '/miewen/mini/login/register/user',
    'POST',
    data
  )
}

// 登录
export function signIn(data) {
  return request.doRequest(
    '/miewen/mini/login/signIn',
    'GET',
    data
  )
}

// 再次登录
export function signInAgain(data) {
  return request.doRequest(
    '/miewen/mini/login/signInAgain',
    'GET',
    data
  )
}

// 自动登录
export function signInByOpenId(data) {
  return request.doRequest(
    '/miewen/mini/login/mini/signIn/openId',
    'GET',
    data
  )
}

// 退出登录
export function signOut(data) {
  return request.doRequest(
    '/miewen/mini/login/signOut',
    'GET',
    data
  )
}

// 解绑微信
export function unbindVChat(data) {
  return request.doRequest(
    '/miewen/mini/login/unbindVChat',
    'GET',
    data
  )
}

// 获取验证码
export function smsCode(data) {
  return request.doRequest(
    '/miewen/mini/sms/smsCode',
    'POST',
    data
  )
}

// 忘记密码
export function updatePassword(data) {
  return request.doRequest(
    '/miewen/mini/login/updatePassword',
    'POST',
    data
  )
}
